import Vue from 'vue'
import VueRouter from 'vue-router'
<<<<<<<< HEAD:src/pages/Home/router/index.js
import Home from '../views/Home.vue'
========
import dispatch from '../views/index.vue'
import detailIndex from '../views/detail-index.vue'

>>>>>>>> 3710d72 (xy):src/pages/dispatch/router/index.js
const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
<<<<<<<< HEAD:src/pages/Home/router/index.js
    name: 'Home',
    component: Home
========
    name: 'Dispatch',
    component: dispatch
  },
  {
    path: '/detail',
    name: 'Detail',
    component: detailIndex
>>>>>>>> 3710d72 (xy):src/pages/dispatch/router/index.js
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
